package io.e2x.testground.fruitstore.dal.entities;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.Table;

import java.math.BigDecimal;

/**
 * 订单项
 * @author: sukimiya
 * @date: 2020/5/27 16:01
 */
@Table("TRADE_ORDER_ITEM")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class TradeOrderItem {
    @Id
    private long id;
    /**
     * 订单ID
     */
    private long orderId;
    /**
     * 用户ID
     */
    private long userId;
    /**
     * 商品ID
     */
    private long skuId;

    /**
     * 购买商品数量
     */
    private Integer count;

    /**
     * 优惠价格
     */
    private BigDecimal couponPrice;
    /**
     * 减免价格
     */
    private BigDecimal discountPrice;
    /**
     * 实际支付价格
     */
    private BigDecimal payPrice;
    /**
     * 订单价格
     */
    private BigDecimal price;
}
